﻿<?xml version="1.0" encoding="utf-8"?>
<xs:schema id="Clips"
    targetNamespace="http://lostmsu.broker.freenet6.net/Clips/Clips.xsd"
    elementFormDefault="qualified"
    xmlns="http://lostmsu.broker.freenet6.net/Clips/Clips.xsd"
    xmlns:mstns="http://lostmsu.broker.freenet6.net/Clips/Clips.xsd"
    xmlns:xs="http://www.w3.org/2001/XMLSchema"
>
  <xs:complexType name="dependencyType">
    <xs:attribute name="package" type="xs:string" use="required"/>
    <xs:attribute name="type" type="xs:string" use="required"/>
    <xs:anyAttribute processContents="skip" />
  </xs:complexType>
  
  <xs:complexType name="versionType">
    <xs:sequence>
      <xs:element name="dependency" type="dependencyType"
                  minOccurs="0" maxOccurs="unbounded" />
    </xs:sequence>

    <xs:attribute name="date" type="xs:dateTime" use="required" />
    <xs:attribute name="publicKey" type="xs:base64Binary" use="required"/>
    <xs:attribute name="processor" type="xs:string" use="optional" default="msil"/>
    <xs:attribute name="culture" type="xs:string" use="optional" />
    <xs:attribute name="uri" type="xs:anyURI" use="required"/>
    <xs:attribute name="string" type="xs:string" use="required" />
    <xs:attribute name="type" type="xs:string" use="required"/>
  </xs:complexType>
  
  <xs:complexType name="packageType">
    <xs:sequence>
      <xs:element name="version" type="versionType"/>
    </xs:sequence>

    <xs:attribute name="name" type="xs:string"/>
    <xs:attribute name="description" type="xs:string"/>
  </xs:complexType>
  
  <xs:complexType name="repositoryType">
    <xs:sequence>
      <xs:element name="package" type="packageType"
                  minOccurs="0" maxOccurs="unbounded"/>
    </xs:sequence>

    <xs:attribute name="name" type="xs:string" use="required"/>
    <xs:attribute name="maintainer" type="xs:anyURI" use="required"/>
  </xs:complexType>

  <xs:element name="repository" type="repositoryType" />
</xs:schema>
